//
//  JBossServer.m
//  jboss-admin
//
//  Created by Christos Vasilakis on 19/06/2010.
//  Copyright 2010 All rights reserved.
//

#import "JBossServer.h"


@implementation JBossServer
@synthesize name;
@synthesize hostname;
@synthesize username;
@synthesize password;

- (void)dealloc {
	[name release];
	[hostname release];
	[username release];
	[password release];
	[super dealloc];
}

#pragma mark -
#pragma mark NSCoding
- (void)encodeWithCoder:(NSCoder *)aCoder {
	[aCoder encodeObject:self.name forKey:kJBossServerNameKey];
	[aCoder encodeObject:self.hostname forKey:kJBossServerHostnameKey];
	[aCoder encodeObject:self.username forKey:kJBossServerUsernameKey];
	[aCoder encodeObject:self.password forKey:kJBossServerPasswordKey];
}

- (id)initWithCoder:(NSCoder *)aDecoder {
	if (self = [super init]) {
		self.name = [aDecoder decodeObjectForKey:kJBossServerNameKey];
		self.hostname = [aDecoder decodeObjectForKey:kJBossServerHostnameKey];
		self.username = [aDecoder decodeObjectForKey:kJBossServerUsernameKey];
		self.password = [aDecoder decodeObjectForKey:kJBossServerPasswordKey];
	}
	
	return self;
}

@end
